<template>
	<view class="body">
    <view class="user-item" v-for="(item,index) in myList" :key="index">
      <u-avatar :src="item.img" size="80"></u-avatar>
      <text class="title">{{ item.lable }}</text>
      <u-button class="btn" type="primary" size="medium" @click="itemClick(item)" >进入</u-button>
    </view>
	</view>
</template>

<script>
	import appMixin from "@/mixins/app";

  export default {
    mixins: [appMixin],
		data() {
			return {
        myList:[
          {
            lable:'线索管理',
            img:'',
            url:''
          },
          {
            lable:'我的客户',
            img:'',
            url:''
          },
          {
            lable:'销售FAQ',
            img:'',
            url:''
          },
          {
            lable:'我的FAQ',
            img:'',
            url:''
          }
        ]
			}
		},
		onLoad() {
		},
    methods: {
      itemClick(item){
        console.log('跳转',item)
        if(item.lable==='线索管理'){
          this.$u.route({
            url: '/pages_xzx/marketCRM/clueList'
          })
        }
      }
		}
	}
</script>

<style lang="scss" scoped>
.body{
  height: 100vh;
  overflow-y: auto;
  background-color: #f9f9f9;
  .user-item{
    display: flex;
    align-items: center;
    padding: 20rpx;
    margin: 20rpx;
    background-color: #fff;
    border-radius: 20rpx;
    .img{
      flex: 1;
    }
    .title{
      flex: 2;
      margin-left: 20rpx;
      text-align: center;
    }
    .btn{
      margin-right: 20rpx;
    }
  }
}
</style>
